import GbzInstance from "../GbzInstance";

const { ccclass, property } = cc._decorator;

@ccclass
export default class GbzBoard extends cc.Component {


    getJoints() {
        return this.node.getComponents(cc.RevoluteJoint)
    }

    protected update(dt: number): void {
        let size = Math.max(this.node.height, this.node.width)
        if (this.node.y <= -(cc.winSize.height / 2 + size / 2)) {
            GbzInstance.gameMgr.levelComp.onBoardDestroy(this.node)
        }
    }
}
